//
//  BaseNavigationController.swift
//  FearfulNotification
//
//  Created by 筱鹏 on 2017/8/24.
//  Copyright © 2017年 筱鹏. All rights reserved.
//

import UIKit

class BaseNavigationController: UINavigationController {
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.configNavBarInfo()
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    override var preferredStatusBarStyle: UIStatusBarStyle {
        get {
            return .lightContent
        }
    }

    func configNavBarInfo() {
        self.navigationBar.barTintColor = Theme.color.background
        self.navigationBar.tintColor = Theme.color.foreground
        self.navigationBar.shadowImage = UIImage.grayImage()
        self.navigationBar.titleTextAttributes = [.foregroundColor: Theme.color.navigationTitle]
    }
    
    override func show(_ vc: UIViewController, sender: Any?) {
        vc.hidesBottomBarWhenPushed = true
        super.show(vc, sender: sender)
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
